home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#44 (May 89)
/
Hyper Stuff.sit
/
SimpleXCMD.C
< prev
next >
Wrap
Text File
|
1989-03-01
|
2KB
|
58 lines
/********************************/
/* File: SimpleXCMD.c */
/* */
/* This is what a simple XCMD */
/* written in Lightspeed "C" */
/* In order to build this code */
/* resource, you will need the */
/* two files "HyperXCMD.h" and */
/* XCMDGlue.c. */
/* */
/* ---------------------------- */
/* To Build: */
/* */
/* (1) Create a project using */
/* this file as well as the */
/* XCMD.Glue.c file. (Set */
/* project type to XCMD (or */
/* XFCN) from the Project menu. */
/* */
/* (2) Bring the project up to */
/* date. */
/* */
/* (3) Build Code Resource. */
/* */
/* (4) Use ResEdit to copy the */
/* resource to your stack. */
/********************************/
#include <MacTypes.h>
#include <OSUtil.h>
#include <MemoryMgr.h>
#include <FileMgr.h>
#include <ResourceMgr.h>
#include "HyperXCmd.h"
pascal void main( paramPtr )
XCmdBlockPtr paramPtr;
{
char theString[256]; /* A "Pascal" String */
theString[0] = '\0x0B'; /* Remember, static */
theString[1] = 'H'; /* strings are placed */
theString[2] = 'E'; /* in the global pool */
theString[3] = 'L'; /* CODE resources such */
theString[4] = 'L'; /* as XCMDS and XFCNS */
theString[5] = 'O'; /* don't have access to */
theString[6] = ' '; /* globals so you have */
theString[7] = 'W'; /* to discretely set the*/
theString[8] = 'O'; /* string's value */
theString[9] = 'R';
theString[10]= 'L';
theString[11]= 'D';
/* A sample callback example */
paramPtr->returnValue = PasToZero( paramPtr, &theString );
}